package NewTmas.Listeners;

import NewTmas.FramesandPanels.TablePanel;

import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

/**
 * Created by IntelliJ IDEA.
 * User: abhatnag
 * Date: 7/12/11
 * Time: 4:31 PM
 * To show a column selected in the show columns menu
 */
public class ColumnShowListener implements ItemListener{
    TablePanel tablePanel;
    int columnIndex;

    public ColumnShowListener(TablePanel tablePanel , int column ) {
        this.tablePanel=tablePanel;
        this.columnIndex=column;
    }

    public void itemStateChanged(ItemEvent e) {


         tablePanel.showColumn(columnIndex);
    }
}
